<?php defined('RUN_KATANA') or die('Restricted access'); ?>
<?php 
if($shop->getProviders())
{
	$countries = $shop->getCountryList();
	foreach($shop->getProviders() as $provider)
	{
		echo '<tr class="items">';
		echo '<td class="first center">'.$provider->getId().'</td>';
		echo '<td class="center">';
		echo 	'<input type="hidden" name="provider_id[]" value="'.$provider->getId().'" />';
		echo 	'<div style="display:none;">'.$provider.'</div>';
		echo 	'<input class="select_list" type="checkbox" name="selected[]" value="'.$provider->getId().'" /></td>';
		echo '<td><input class="small" name="provider_title[]" type="text" value="'.$provider->getTitle().'" maxlength="80" /></td>';
		echo '<td><input class="xsmall" name="provider_title_import[]" type="text" value="'.$provider->getTitleImport().'" maxlength="50" /></td>';
		echo '<td>';
		echo 	'<select class="small-m" name="provider_country[]" >';
		echo 		'<option value="--" '.getIsSelectedHTML($provider->getCountry(), '--').'>'.ucfirst($txt->getWord('undefined')).'</option>';
					if($countries)
					{
						foreach($countries as $country)
						{ 
							if(getIsSelectedHTML($provider->getCountry(), $country['iso']) != '')
							{ echo '<option value="'.$country['iso'].'" '.getIsSelectedHTML($provider->getCountry(), $country['iso']).'>'.$country['printable_name'].'</option>'; }
						}
					}
		echo 	'</select>';
		echo '</td>';
		?>
		<td><input class="small" name="provider_city[]" type="text" value="<?php echo $provider->getCity(); ?>" maxlength="80" /></td>
		<td><input class="xsmall numeric" name="provider_zip[]" type="text" value="<?php echo $provider->getZip(); ?>" maxlength="10" /></td>
		<td><input class="small-m" name="provider_email[]" type="text" value="<?php echo $provider->getEmail(); ?>" maxlength="80" /></td>
		<td><input class="xsmall" name="provider_tel[]" type="text" value="<?php echo $provider->getTel(); ?>" maxlength="80" /></td>
		<td>
			<?php echo $commander->getActivationFieldsObject($provider); ?>
			<input type="hidden" name="provider_active[]" value="<?php echo $provider->getActive(); ?>" />
		</td>
		<td class="center">
			<a href="?con=<?php echo $_REQUEST['con']; ?>&amp;provider=<?php echo $provider->getId(); ?>"><img title="<?php echo ucfirst($txt->getWord('edit')); ?>" class="icon command" src="<?php echo SYSICONS_URL; ?>configure_16.gif" /></a>
		</td>
		<td class="last center">
		<img title="<?php echo ucfirst($txt->getWord('delete').' '.$txt->getWord('provider')); ?>" class="icon command provider_delete" src="<?php echo SYSICONS_URL; ?>delete_16.gif" onclick="deleteDialog(<?php echo $provider->getId(); ?>);" />
		</td>
		<?php
		echo '</tr>';
	}
}
?>